﻿Public Class frmTimeOut

    Private Sub cmdVerify_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdVerify.Click
        If MessageBox.Show("Are You Sure? If Yes then Current System Time will be Recorded", "Verify Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
            lblTimeOut.Text = Date.Now.ToShortTimeString
            cmdOk.Enabled = True
            cmdVerify.Enabled = False
            rbYes.Enabled = True
            rbNo.Enabled = True
        End If
    End Sub

    Private Sub cmdOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOk.Click
        Me.Hide()
        frmMain.Show()
        frmMain.cmdTimeOut.Enabled = False
    End Sub

    Private Sub cmdBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdBack.Click
        Me.Close()
        frmMain.Show()
    End Sub

    Private Sub rbYes_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbYes.CheckedChanged
        If (rbYes.Checked = True) Then
            cbHours.Enabled = True
        ElseIf (rbNo.Checked = True) Then
            cbHours.Enabled = False
            cbHours.Text = ""
        End If
    End Sub
End Class